/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.autoescola.core.dao;

import javax.validation.constraints.NotNull;

/**
 *
 * @author leonardo luz fernandes
 * @version 0.1
 * @since 08/11/2010
 */

@Dao
public interface CrudDao<EntityKey, EntityType> {

    public EntityType load( @NotNull EntityKey key ) throws Exception ;
    public EntityType save( @NotNull EntityType entity ) throws Exception ;
    public EntityType saveOrUpdate( @NotNull EntityType entity ) throws Exception ;
    public EntityType update( @NotNull EntityType entity ) throws Exception ;
    public boolean delete( @NotNull EntityKey key ) throws Exception ;
    
}//end interface
